<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="借款记录">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
								
								<div class="toolbor-module export">
										&nbsp;&nbsp;&nbsp;借款总金额：${total!0}元<br/>
										&nbsp;&nbsp;&nbsp;待还款金额：${repayNo!0}元<br/>
										&nbsp;&nbsp;&nbsp;已还款金额：${repayYes!0}元<br/>
                                </div>
								
                                 <div class="toolbor-module search">
                    				<input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                				</div>
                		
								<div class="toolbor-module search">
									<div class="formTit">资产管理公司：</div>
									<div class="select-box" id="fid">
										<div class="tag-select">全部</div>
										<ul class="tag-options">
											<li data-value="">全部</li> 
											<#if fList??> <#list fList as item>
											<li data-value="${item.id?c}">${item.name}</li>
											 </#list> </#if>
										</ul>
									</div>
								</div>

								<div class="toolbor-module search">
                                <div class="formTit">项目名称：</div>
                                    <input type="text" name="borrowName" id="borrowName" value="请输入项目名称" class="search-value">
                                </div>
                                
                                 <div class="toolbor-module search">
                                    <div style="height:22px;line-height:22px;float:left;">借款时间：</div>
                                    <input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                                    <div class="formTit"> 到 </div>
                                    <input class="_search-value" name="endDate" id="endDate" value=""  onclick="change_picktime()"/>
                                </div>
                                
                                <div class="toolbor-module search">
                                    <div style="height:22px;line-height:22px;float:left;">还款时间：</div>
                                    <input class="_search-value" name="repayStartDate" id="repayStartDate" value="" onclick="change_picktime()"/>
                                    <div class="formTit"> 到 </div>
                                    <input class="_search-value" name="repayEndDate" id="repayEndDate" value=""  onclick="change_picktime()"/>
                                </div>
                                
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>项目名称</td>
                                             <td>资产管理公司</td>
                                            <td>项目总金额</td>
                                            <td>年化收益</td>
                                            <td>借款期限</td>
                                            <td>已还款金额</td>
                                            <td>未还款金额</td>
                                            <td>已还款金额[投]</td>
                                            <td>未还款金额[投]</td>
                                            <td>借款时间</td>
                                            <td>还款时间</td>
                                            <td>操作</td>
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item[0]?c}</td>
                                                <td>${item[1]!''}</td>
                                                <td>${item[2]!''}</td>
                                                <td>${item[3]!0}元</td>
                                                <td>${item[4]!''}%</td>
                                                <td><#if item[5]==0>${item[6]!''}个月<#else>${item[7]!''}天</#if></td>
                                                <#if item[8]?? && item[8] == 1>
                                                	<td>${item[9]!0}元</td>
                                                	<td>0元</td>
                                                <#elseif item[8]?? && item[8] == 0>
                                                	<td>0元</td>
                                                	<td>${item[9]!0}元</td>
                                                <#else>
                                                 	<td>0元</td>
                                                	<td>${item[9]!0}元</td>
                                                </#if>
                                                <#if item[8]?? && item[8] == 1>
                                                	<td>${item[15]!0}元</td>
                                                	<td>0元</td>
                                                <#elseif item[8]?? && item[8] == 0>
                                                	<td>0元</td>
                                                	<td>${item[15]!0}元</td>
                                                <#else>
                                                 	<td>0元</td>
                                                	<td>${item[15]!0}元</td>
                                                </#if>
                                                <td>${item[10]!''}</td>
                                                <td><#if item[11]??>${item[11]?string("yyyy-MM-dd")}<#else>未投满</#if></td>
                                                <td><a href="/admin/operate/viewTenderDetail.html?borrowId=${item[0]?c}">查看投资详情</a></td>
                                            </tr>
                                            </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1"  />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script>
                                    var url = '?search=true';

                                    function sousuo(){
                                        var sou = "";
                                      
                                        var borrowName = $("#borrowName").val();
                                        if (borrowName!=""&&borrowName!="请输入项目名称"){
                                            sou += "&borrowName="+borrowName;
                                        }
                                        var startDate = $("#startDate").val();
                                        var endDate = $("#endDate").val();
                                        if (startDate!=null){
                                            sou += "&startDate="+startDate;
                                        }
                                        if (endDate!=null){
                                            sou += "&endDate="+endDate;
                                        }
                                        
                                        var repayStartDate = $("#repayStartDate").val();
                                        var repayEndDate = $("#repayEndDate").val();
                                        if (repayStartDate!=null){
                                            sou += "&repayStartDate="+repayStartDate;
                                        }
                                        if (repayEndDate!=null){
                                            sou += "&repayEndDate="+repayEndDate;
                                        }
                                        var fid = $("#fid").find(".open-selected").attr("data-value");
                                        if (fid!=null&&fid!=""&&fid!="undefine"){
                                            sou += "&fid="+fid;
                                        }
                                        if (sou!=""){
                                            location.href=url+sou;
                                        }
                                    }
                                 
                                </script>
                            </div>

            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>

    </body>
</html>
<#include "../jsPage.html">
